#!/bin/bash 
set -e


TMP=${TMP:-/tmp/work}
LOG=${LOG:-$HOME/logs/stage4}
SRC=${SRC:-/sources}

name=icu 
version=68.2

rm -rf $TMP
mkdir -p $TMP $LOG

tar xf $SRC/icu4c-${version/./_}-src.tgz -C $TMP

{ time \
   {

    cd $TMP/$name/source 
    
	./configure --prefix=/usr
	make

	make install

    }
} 2>&1 | tee $name.log
    
[ $PIPESTATUS = 0 ] && mv $name.log $LOG || exit $PIPESTATUS

rm -fr $TMP
